<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Queries\BannerQuery;
use App\Http\Resources\BannerResource;

class BannerController extends Controller
{
    public function index(BannerQuery $query){
        $rows = $query->where('valid', true)->get();
        return $this->resource(BannerResource::collection($rows));
    }
}
